<?php

namespace App\Models\CarModels;

use App\Models\SystemManagement\Employee;
use Illuminate\Database\Eloquent\Model;
class CarYearCheckRecord extends Model
{
    //

    protected $table = 'car_year_check_records';
    protected $fillable = ['car_id','odds','handles','department','record_id','desc','next_check_time','fee','check_time'];

    public function car(){
        return $this->belongsTo(CarInfo::class,'car_id','id')->with('kind');
    }

    public function record(){
        return $this->belongsTo(Employee::class,'record_id','id');
    }

    function files(){
        return $this->hasMany(CarYearCheckRecordFiles::class,'f_id')->with('file');
    }

}
